#pragma once

#include "StaticMeshDrawingList.h"

namespace RenderSystem
{ 
	//class StaticMeshDrawingList;

	class Renderable;


	class DepthPriorityGroup
	{
	public:

		enum EBasePassDrawListType
		{
			EBasePass_Default=0,
			EBasePass_Masked,
			EBasePass_Decals,
			EBasePass_Decals_Translucent,
			EBasePass_MAX
		};

		// various static draw lists for this DPG

		/** position-only opaque depth draw list */
		TStaticMeshDrawList<FPositionOnlyDepthDrawingPolicy> PositionOnlyDepthDrawList;
		/** opaque depth draw list */
		TStaticMeshDrawList<FDepthDrawingPolicy> DepthDrawList;
		/** masked depth draw list */
		TStaticMeshDrawList<FDepthDrawingPolicy> MaskedDepthDrawList;
		/** Base pass draw list - no light map */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FNoLightMapPolicy,FNoDensityPolicy> > BasePassNoLightMapDrawList[EBasePass_MAX];
		/** Base pass draw list - directional vertex light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FDirectionalVertexLightMapPolicy,FNoDensityPolicy> > BasePassDirectionalVertexLightMapDrawList[EBasePass_MAX];
		/** Base pass draw list - simple vertex light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FSimpleVertexLightMapPolicy,FNoDensityPolicy> > BasePassSimpleVertexLightMapDrawList[EBasePass_MAX];
		/** Base pass draw list - directional texture light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FDirectionalLightMapTexturePolicy,FNoDensityPolicy> > BasePassDirectionalLightMapTextureDrawList[EBasePass_MAX];
		/** Base pass draw list - simple texture light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FSimpleLightMapTexturePolicy,FNoDensityPolicy> > BasePassSimpleLightMapTextureDrawList[EBasePass_MAX];
		/** Base pass draw list - directional light only */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FDirectionalLightLightMapPolicy,FNoDensityPolicy> > BasePassDirectionalLightDrawList[EBasePass_MAX];
		/** Base pass draw list - SH light + directional light */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FSHLightLightMapPolicy,FNoDensityPolicy> > BasePassSHLightDrawList[EBasePass_MAX];
		/** Base pass draw list - dynamically shadowed point, spot or directional light */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FDynamicallyShadowedMultiTypeLightLightMapPolicy,FNoDensityPolicy> > BasePassDynamicallyShadowedDynamicLightDrawList[EBasePass_MAX];
		/** Base pass draw list - vertex shadow mapped dynamic light + directional vertex light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FShadowedDynamicLightDirectionalVertexLightMapPolicy,FNoDensityPolicy> > BasePassShadowedDynamicLightDirectionalVertexLightMapDrawList[EBasePass_MAX];
		/** Base pass draw list - texture shadow mapped dynamic light + directional texture light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FShadowedDynamicLightDirectionalLightMapTexturePolicy,FNoDensityPolicy> > BasePassShadowedDynamicLightDirectionalLightMapTextureDrawList[EBasePass_MAX];
		/** Base pass draw list - texture distance field shadowed dynamic light + directional texture light maps */
		TStaticMeshDrawList<TBasePassDrawingPolicy<FDistanceFieldShadowedDynamicLightDirectionalLightMapTexturePolicy,FNoDensityPolicy> > BasePassDistanceFieldShadowedDynamicLightDirectionalLightMapTextureDrawList[EBasePass_MAX];

		/** hit proxy draw list */
		TStaticMeshDrawList<FHitProxyDrawingPolicy> HitProxyDrawList;
		/** draw list for motion blur velocities */
		TStaticMeshDrawList<FVelocityDrawingPolicy> VelocityDrawList;

		/** Maps a light-map type to the appropriate base pass draw list. */
		template<typename LightMapPolicyType>
		TStaticMeshDrawList<TBasePassDrawingPolicy<LightMapPolicyType,FNoDensityPolicy> >& GetBasePassDrawList(EBasePassDrawListType DrawType);
	};

	typedef enum DepthPriorityGroupType
	{
		eBackgroud,
		eMain,
		eForegroud,
		eEnd
	} DepthPriorityGroup;

}